import { patrolingCruise } from '@/api/control'
import { useCarStore } from '@/stores/car'
import { defineStore } from 'pinia'

export const useLightStore = defineStore('light', () => {
  const carStore = useCarStore()
  async function onClickLightStatus() {
    const data = {
      code: carStore.currentCar,
      param1: 7,
      param2: 4,
      param3: 255,
      param4: 255
    }
    patrolingCruise(data)
  }
  return {
    onClickLightStatus
  }
})
